package com.example.kt_base.s5

//TODO 94.Kotlin语言的解构声明
class Student4(var name:String,var age:Int){
   operator fun component1()=name
    operator fun component2()=age

}

data class Student5(var name:String,var age:Int){

}
fun main() {

    val (name,age)=Student4("huang",15)
    println("student4：$name,$age")

    val(name1,age1:Int)=Student5("den",22)
    println("student5：$name1,$age1")
}
